﻿<%@ Page Language="c#" CodeBehind="Desktop.aspx.cs" AutoEventWireup="false" Inherits="UDS.SubModule.UnitiveDocument.DesktopPage" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
  <title>Desktop</title>
  <uds:Style runat="server" Href="~/css/BasicLayout.css" />
  <script language="javascript" type="text/javascript">
  //<!--
  function dialwinprocess(CurrDate, CurrTime, whichPg, TaskID) {
    if (whichPg == 1)
      var newdialoguewin = window.showModalDialog("../Schedule/Manage.aspx?CurrDate=" + CurrDate + "&CurrTime=" + CurrTime, window, "dialogWidth:1000px;DialogHeight=700px;status:no");
    else if (whichPg == 2)
      var newdialoguewin = window.showModalDialog("../Schedule/TaskDetail.aspx?TaskID=" + TaskID + "&Date=" + CurrDate, window, "dialogWidth:700px;DialogHeight=600px;status:no");
    else if (whichPg == 3)
      var newdialoguewin = window.showModalDialog("../Schedule/TaskStatus.aspx?TaskID=" + TaskID + "&Date=" + CurrDate, window, "dialogWidth:700px;DialogHeight=600px;status:no");
  }
  //-->
  </script>
</head>
<body>
  <form id="Desktop" method="post" runat="server">
    <table cellspacing="10" cellpadding="0" width="100%" align="center" border="0">
      <tr>
        <td valign="top">
          <table id="Table1" cellspacing="0" cellpadding="0" align="left" border="0">
            <tr>
              <td>
                <img id="IMG1" src="../../Images/desktop1.jpg" border="0" runat="server" />
              </td>
              <td valign="bottom" align="right" width="40"><a href="../Schedule/TaskList.aspx" target="_self">
                <img alt="" src="../../Images/more.gif" border="0" /></a> </td>
              <td valign="bottom" align="right" width="40"><a onclick="var newwin=window.open('../Schedule/Manage.aspx','newtask','toolbar=yes,scrollbars=yes,width=800,height=600,resizable=yes');newwin.moveTo(0,0);newwin.focus();" href="#" target="_self">
                <img alt="" src="../../Images/new.gif" border="0" /></a></td>
            </tr>
            <tr>
              <td>
                <asp:DataGrid ID="dgList" runat="server" AllowPaging="True" BorderColor="#E8F4FF" GridLines="Horizontal" PageSize="5" DataKeyField="ID" Width="100%" PagerStyle-HorizontalAlign="center" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" BackColor="White" CellPadding="2" OnPageIndexChanged="DataGrid_PageChanged" CssClass="top" BorderWidth="1px">
                  <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                  <HeaderStyle Font-Size="X-Small" Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699" VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
                  <FooterStyle Font-Size="XX-Small" HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
                  <Columns>
                    <asp:TemplateColumn HeaderText="时段">
                      <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                      <ItemStyle HorizontalAlign="Left"></ItemStyle>
                      <ItemTemplate>
                        <asp:Label runat="server" Text='<%# GetDateString(DataBinder.Eval(Container, "DataItem.Date").ToString())+"  "+GetPeriodByPeriodID(DataBinder.Eval(Container, "DataItem.EndTime").ToString(),DataBinder.Eval(Container, "DataItem.beginPeriodID").ToString(),(DataBinder.Eval(Container, "DataItem.endPeriodID").ToString())) %>' ID="Label2" NAME="Label2">
                        </asp:Label>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="内容">
                      <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                      <ItemStyle HorizontalAlign="Center"></ItemStyle>
                      <ItemTemplate>
                        <a href="#" onclick='javascript:return dialwinprocess("","","2","<%# DataBinder.Eval(Container, "DataItem.TaskID") %>")'>
                          <asp:Label runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Subject") %>' ID="Label3" NAME="Label3"></a> </asp:Label>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                  </Columns>
                  <PagerStyle Visible="False" HorizontalAlign="Right" ForeColor="White" BackColor="#93BEE2" Mode="NumericPages"></PagerStyle>
                </asp:DataGrid>
              </td>
            </tr>
          </table>
        </td>
        <td valign="top">
          <table id="Table2" cellspacing="0" cellpadding="0" align="left" border="0">
            <tr>
              <td>
                <img id="Img4" src="../../Images/desktop2.jpg" border="0" runat="server"></td>
              <td valign="bottom" align="right" width="40"><a href="NewDoc/Listview.aspx" target="_self">
                <img alt="" src="../../Images/more.gif" border="0"></a></td>
              <td valign="bottom" align="right" width="40"></td>
            </tr>
            <tr>
              <td>
                <asp:DataGrid ID="dgDocList" runat="server" AllowPaging="True" BorderColor="#E8F4FF" GridLines="Horizontal" PageSize="5" DataKeyField="DocID" Width="100%" PagerStyle-HorizontalAlign="right" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="2" BorderWidth="1px" Font-Names="Arial" AllowSorting="True">
                  <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                  <HeaderStyle Font-Size="X-Small" Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699" VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
                  <FooterStyle Font-Size="XX-Small" HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
                  <Columns>
                    <asp:TemplateColumn HeaderText="文档标题">
                      <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                      <ItemStyle Font-Size="X-Small" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                      <ItemTemplate>
                        <a href='Document/BrowseDocument.aspx?DocId=<%# DataBinder.Eval(Container.DataItem,"DocID") %>'><%# (DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Length>30)?DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Substring(0,30)+"...":DataBinder.Eval(Container.DataItem,"DocTitle").ToString() %> </a>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="审批人">
                      <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                      <ItemStyle Font-Size="X-Small" HorizontalAlign="Center"></ItemStyle>
                      <ItemTemplate>
                        <asp:Label runat="server" Text='<%# GetRealName(DataBinder.Eval(Container, "DataItem.DocApprover").ToString()) %>' />
                      </ItemTemplate>
                      <FooterStyle Font-Size="X-Small"></FooterStyle>
                    </asp:TemplateColumn>
                  </Columns>
                  <PagerStyle Visible="False" Font-Size="12px" BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Right" PageButtonCount="5" Mode="NumericPages"></PagerStyle>
                </asp:DataGrid>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td height="40"></td>
        <td></td>
      </tr>
      <tr>
        <td valign="top">
          <%--<table id="Table3" cellspacing="0" cellpadding="0" align="left" border="0">
            <tr>
              <td valign="top"><img id="IMG2" src="../../Images/desktop3.jpg" border="0" runat="server"></td>
              <td valign="bottom" align="right" width="40"><a href="Mail/Index.aspx" target="_self"><img alt="" src="../../Images/more.gif" border="0"></a></td>
              <td valign="bottom" align="right" width="40"><a href="Mail/Compose.aspx?ClassID=0" target="_self"><img alt="" src="../../Images/new.gif" border="0"></a></td>
            </tr>
            <tr>
              <td>
                <asp:DataGrid ID="dgMailList" runat="server" AllowPaging="True" BorderColor="#E8F4FF" GridLines="Horizontal" PageSize="5" DataKeyField="MailID" Width="100%" PagerStyle-HorizontalAlign="right" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="2" BorderWidth="1px" Font-Names="Arial" AllowSorting="True">
                  <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                  <HeaderStyle Font-Size="X-Small" Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699" VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
                  <FooterStyle Font-Size="XX-Small" HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
                  <Columns>
                    <asp:TemplateColumn HeaderText="邮件主题">
                      <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                      <ItemStyle Font-Size="X-Small" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                      <ItemTemplate>
                        <a href='Mail/ReadMail.aspx?FolderType=1&MailId=<%# DataBinder.Eval(Container.DataItem,"MailID") %>'>
                          <%# (DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Length>30)?DataBinder.Eval(Container.DataItem,"MailSubject").ToString().Substring(0,30)+"...":DataBinder.Eval(Container.DataItem,"MailSubject").ToString() %>
                        </a>
                        <%# DataBinder.Eval(Container.DataItem,"attnumber").ToString()==""?"":(DataBinder.Eval(Container.DataItem,"attnumber").ToString()=="0"?"":"<img src='../../DataImages/attach.gif' border='0'>") %>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="MailSender" HeaderText="发送者">
                      <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                      <ItemStyle Font-Size="X-Small" HorizontalAlign="Center"></ItemStyle>
                    </asp:BoundColumn>
                  </Columns>
                  <PagerStyle Visible="False" Font-Size="12px" BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Right" PageButtonCount="5" Mode="NumericPages"></PagerStyle>
                </asp:DataGrid></td>
            </tr>
          </table>--%>
        </td>
        <td valign="top">
          <table id="Table4" cellspacing="0" cellpadding="0" align="left" border="0">
            <tr>
              <td valign="top">
                <img id="IMG3" src="../../Images/desktop4.jpg" border="0" runat="server"></td>
              <td valign="bottom" align="right" width="40"><a href="Approve/Listview.aspx" target="_self">
                <img alt="" src="../../Images/more.gif" border="0"></a></td>
              <td valign="bottom" align="right" width="40"></td>
            </tr>
            <tr>
              <td>
                <asp:DataGrid ID="dgAppDocList" runat="server" AllowPaging="True" BorderColor="#E8F4FF" GridLines="Horizontal" PageSize="5" DataKeyField="DocID" Width="100%" PagerStyle-HorizontalAlign="right" PagerStyle-Mode="NumericPages" AutoGenerateColumns="False" CellPadding="3" BorderWidth="1px" Font-Names="Arial" AllowSorting="True" DESIGNTIMEDRAGDROP="164">
                  <ItemStyle Font-Size="X-Small" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
                  <HeaderStyle Font-Size="X-Small" Font-Bold="True" HorizontalAlign="Center" Height="20px" ForeColor="#006699" VerticalAlign="Middle" BackColor="#E8F4FF"></HeaderStyle>
                  <FooterStyle Font-Size="XX-Small" HorizontalAlign="Center" Height="10px" VerticalAlign="Bottom"></FooterStyle>
                  <Columns>
                    <asp:TemplateColumn HeaderText="文档标题">
                      <HeaderStyle HorizontalAlign="Left"></HeaderStyle>
                      <ItemStyle Font-Size="X-Small" HorizontalAlign="Left" VerticalAlign="Middle"></ItemStyle>
                      <ItemTemplate>
                        <a href='Document/ApproveDocument.aspx?DocId=<%# DataBinder.Eval(Container.DataItem,"DocID") %>'><%# (DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Length>30)?DataBinder.Eval(Container.DataItem,"DocTitle").ToString().Substring(0,30)+"...":DataBinder.Eval(Container.DataItem,"DocTitle").ToString() %> </a>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:TemplateColumn HeaderText="上传人">
                      <HeaderStyle HorizontalAlign="Center" Width="80px"></HeaderStyle>
                      <ItemStyle Font-Size="X-Small" HorizontalAlign="Center"></ItemStyle>
                      <ItemTemplate>
                        <asp:Label runat="server" Text='<%# GetRealName(DataBinder.Eval(Container, "DataItem.DocAddedBy").ToString()) %>'>
                        </asp:Label>
                      </ItemTemplate>
                    </asp:TemplateColumn>
                  </Columns>
                  <PagerStyle Visible="False" Font-Size="12px" BorderColor="#E0E0E0" BorderStyle="Dotted" HorizontalAlign="Right" PageButtonCount="5" Mode="NumericPages"></PagerStyle>
                </asp:DataGrid>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </form>
</body>
</html>
